home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / DISKINFO.DMO < prev    next >
Text File  |  1996-07-04  |  2KB  |  58 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   DISKINFO.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NB02.INC"
  19. COLOR 7,0
  20. CLS
  21.  
  22. ? "┌────────────────────────────────────────────────────────────────────────
  23. ? "│ fDiskFree& (SEG Drive$)  free disk space on Drive$
  24. ? "│ fDiskSize& (SEG Drive$)  total disk size of Drive$
  25. ? "├────────────────────────────────────────────────────────────────────────
  26. ? "│ Pretty simple!
  27. ? "└────────────────────────────────────────────────────────────────────────
  28.  
  29. DriveSpec$ = "C:\DOS\*.*"
  30. M$ = " #,###,###,### bytes"
  31. PRINT "DriveSpec$ = "; DriveSpec$
  32. PRINT
  33. PRINT USING "The drive is can hold" + M$ ; fDiskSize&( DriveSpec$ )
  34. PRINT USING "There are" + M$ + " free"   ; fDiskFree&( DriveSpec$ )
  35.  
  36. PRINT
  37. PRINT
  38.  
  39. DriveSpec$ = ""
  40. PRINT "DriveSpec$ = NULL for current drive"
  41. PRINT
  42. PRINT USING "The drive is can hold" + M$ ; fDiskSize&( DriveSpec$ )
  43. PRINT USING "There are" + M$ + " free"   ; fDiskFree&( DriveSpec$ )
  44. PRINT
  45.  
  46. FOR C? = 65 TO 80
  47.   D$ = CHR$(C?)
  48.   IF fIsDrive%( D$ ) = 0 THEN EXIT FOR
  49.   PRINT "DRIVE "; D$;
  50.   S& = fDiskSize&( D$ )
  51.   IF S& > 0 THEN
  52.       F& = fDiskFree&( D$ )
  53.       PRINT USING M$ + " with" + M$ + " free"; S&,F&
  54.     ELSE
  55.       PRINT " is present but not ready."
  56.   END IF
  57. NEXT
  58.